import { BaseSkill } from '../BaseSkill';
import { DamageType, SkillType } from '../../types';
import { General } from '../../models/General';
import { Battle } from '../../models/Battle';

export class ShiRuPoZhu extends BaseSkill {
  constructor() {
    super(
      'shiRuPoZhu',
      '势如破竹',
      SkillType.Active,
      DamageType.Physical,
      0.6
    );
  }

  execute(source: General, battle: Battle): void {
    const target = battle.selectTarget(source);
    if (target) {
      const damage = source.attributes.power * 0.5;
      target.receiveDamage(damage);
    }
  }
}
